package org.example.myweibo.pojo.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

@Data
public class UserLoginDTO {
    @NotBlank(message = "用户名不能为空,以及别的空白字符")
    @Pattern(regexp = "^[\\u4e00-\\u9fa5]{1,7}| [a-zA-Z0-9]{1,14}$", message = "用户名只能由1-14个字母和数字或者1-7个中文组成")
    @ApiModelProperty(value = "用户名", required = true, example = "admin")
    private String username;
    @ApiModelProperty(value = "密码", required = true, example = "123456")
    private String password;
}
